@{
    ViewBag.Title = "添加IP黑白名单";
    }
@section head{
   <script type="text/javascript">
       $(document).ready(function () {
           $('.btnSubmit').click(function () {
               ajax_submit('#content', undefined, function (r) {
                   if (r.success) {
                       $.getByName('BeginIP,EndIP,Memo').val(null);
                       $('Type_black').attr('checked', true);
                       $('Status_1').attr('checked', true);
                   }
               });
           });
       });
   </script>
}
@section body{
<body>
   <div class="easyui-layout" data-options="fit:true">
        <div data-options="region:'north',border:false">
            <div class="navigation">
                <div class="left">
                   @ViewBag.CurrentPath 添加
                </div>
                <a href="javascript:CloseMe();" class="back">后退</a>
            </div>
            <div class="expand_margin"></div>
        </div> 
        <div id='content' data-options="region:'center',border:false" >
             <div class="easyui-tabs" data-options="plain:true,border:false,fit:true">
                <div title="编辑IP黑白名单信息">  
                    <table class="form_table">
                        <col width="180px"/>
                        <tbody>
                            <tr>
                                <th>类型：</th>
                                <td>
                                    <span class="radiobox_midle"><input name="Type" id="Type_black" type="radio" value="1" checked="checked" /><label for="Type_black" class="defaulFont">黑名单</label></span>
                                    <span class="radiobox_midle"><input name="Type" id="Type_white"  type="radio" value="2" /><label for="Type_white" class="defaulFont">白名单</label></span>
                                </td>
                            </tr>                            
                            <tr>
                                <th>起始IP：</th>
                                <td>
                                  <input type="text" name="BeginIP" class="easyui-validatebox imedisable" data-options="required:true,validType:['IP']" />
                                  <label>*</label>
                                </td>
                            </tr>
                            <tr>
                                <th>结束IP：</th>
                                <td>
                                  <input type="text" name="EndIP" class="easyui-validatebox imedisable" data-options="required:true,validType:['IP']" />
                                  <label>*</label>
                                </td>
                            </tr>
                            <tr>
                                <th>状态：</th>
                                <td>
                                   <span class="radiobox_midle"><input name="Status" id="Status_1" type="radio" value="1" checked="checked" /><label for="Status_1" class="defaulFont">启用</label></span>
                                   <span class="radiobox_midle"><input name="Status" id="Status_2" type="radio" value="2" /><label for="Status_2" class="defaulFont">停用</label></span>
                                </td>
                            </tr>
                            <tr>
                                <th>备注：</th>
                                <td>
                                  <input type="text" name="Memo" style="width:400px;" class="easyui-validatebox" data-options="validType:['length[0,128]']" />
                                  <label></label>
                                </td>
                            </tr>
                            <tr>
                               <th></th>
                               <td>
                                  <input type="submit" value="提交保存" class="btnSubmit" />
                               </td>
                            </tr>
                        </tbody>
                    </table>
                </div>          
            </div>
        </div>
    </div>
</body>
}
